package model.playable.structure;
import java.util.*;
import model.command.*;
import model.playable.*;
import model.playable.unit.Worker;

public class University extends MannedStructure implements Researchable
{
	//TechTree
	
	public University(PlayableUser player, Worker[] workers)
	{
		setPlayer(player);
		setIdNumber(-1);
		setUpkeep(1);
		setInfluenceRadius(0);
		setVisibilityRadius(5);
		setCommandQueue(new LinkedList<Command>());
		setCommandsPossibleList(new LinkedList<Command>());
		setCurrentPossibleCommandPosition(0);
		setIsInStandBy(false);
		setIsPoweredDown(false);
		setArmor(10);
		setHealth(50);
		setMaxHealth(50);
		setDefensiveDamage(5);
	}
	
	public LinkedList<Command> createCommandPossibleList()
	{
		LinkedList<Command> possibleCommands = new LinkedList<Command>();
		possibleCommands.add(new PowerDown(this));
		possibleCommands.add(new PowerUp(this));
		possibleCommands.add(new Decommission(this));
		possibleCommands.add(new Standby(this));
		//possibleCommands.add(new Research(this));
		return possibleCommands;
	}
	
	public void incrementHealth(int increment)
	{
		super.incrementHealth(increment);
		if(health <= 0)
			getPlayer().removeUniversity(this);
	}
	
	public void research(String technology)
	{
		
	}
	
	public String toString()
	{
		return "University";
	}
}